package com.jrsoft.bim.enums;

/**
 * ${DESCRIPTION}
 *
 * @author Blueeyedboy
 * @create 2019-12-20 3:10 PM
 **/
public enum ComponentCategoryEnum {
	FLOOR_D("板-双"),
	FLOOR_N("板-无"),
	FLOOR_("板"),
	PILLAR("柱"),
	BRIDGE("梁"),
	STAIRS("楼梯"),
	WALL("墙"),
	OTHER("其他");
	private String value;
	public String getValue(){
		return this.value;
	}
	ComponentCategoryEnum(String value){
		this.value = value;
	}

	public static ComponentCategoryEnum get(String v){
//		System.out.println(v+"----------"+(v.indexOf(BRIDGE.getValue())>-1));
		if(v.startsWith(FLOOR_D.getValue())){
			return FLOOR_D;
		}else if(v.startsWith(FLOOR_N.getValue())){
			return FLOOR_N;
		}else if(v.indexOf(BRIDGE.getValue())>-1 ){
			return BRIDGE;
		}else if(v.startsWith(STAIRS.getValue())){
			return STAIRS;
		}else if(v.indexOf(WALL.getValue())>-1){
			return WALL;
		}else if(v.indexOf(PILLAR.getValue())>-1 && v.indexOf(FLOOR_.getValue())<0){
			return PILLAR;
		}
		return OTHER;
	}
}
